﻿namespace MediaStreamer
{
    public class UserAgentHandler
    {
        public static bool IsPopcornHour(RequestInfo request)
        {
            if (request == null || string.IsNullOrEmpty(request.UserAgent))
                return false;

            return request.UserAgent.StartsWith("Syabas");
        }

        public static bool IsMobile(RequestInfo request)
        {
            if (request == null || string.IsNullOrEmpty(request.UserAgent))
                return false;

            if (request.UserAgent.Contains("Android"))
                return true;

            if (request.UserAgent.Contains("iPhone"))
                return true;

            return false;
        }

    }
}
